'''
控制层：实现界面打印和菜单选择
'''

import market
def main():
    while True:
        print('----------欢迎光临----------')
        choice = int(input('请输入你的选择1:查看商品\n,2:查找\n,3:添加\n,4:修改价格\n,5:删除商品\n,6:查看所有订单\n,7:删除订单\n,8:统计\n,9:新增订单\n'))
        if choice == 1:
          market.show_products()
        elif choice == 2:
          market.get_product()
        elif choice == 3:
          market.add_product()
        elif choice == 4:
          market.mod_product()
        elif choice == 5:
          market.del_product()
        elif choice == 6:
          market.show_orders()
        elif choice == 7:
          market.del_order()
        elif choice == 8:
          market.count_orders()
        elif choice == 9:
          market.add_order()
          break
        else:
            print('输入错误')


if __name__ == '__main__':
    # market.show_products()
    # market.get_product()
    # market.add_product()
    # market.mod_product()
    # market.del_product()
    # market.show_orders()
    # market.del_order()
    market.add_order()